package net.tngou.iask.pojo;



import java.sql.Timestamp;
import java.util.Locale;
import org.ocpsoft.prettytime.PrettyTime;


/**
 * 用户留言板
 * @author 陈磊
 *
 */
public class Msgs extends POJO
{
	
	private long user 	;//	  	留言的主人	 
	private long friend 	;//	  	对方的ID 
	private long sender 	;//		  	留言发送者 
	private long receiver 	;//	 	  	留言接收者 
	private int type 	;//		  	留言类型（普通消息、系统消息） 0(普通) 1（系统） 
	private String msg 	;//	 	  	留言内容 
	private Timestamp  time ;//	  	发送时间 
	private int isread 	;//		  	留言状态  1:读取 ，0  有读取
	public long getUser() {
		return user;
	}
	public void setUser(long user) {
		this.user = user;
	}
	public long getFriend() {
		return friend;
	}
	public void setFriend(long friend) {
		this.friend = friend;
	}
	public long getSender() {
		return sender;
	}
	public void setSender(long sender) {
		this.sender = sender;
	}
	public long getReceiver() {
		return receiver;
	}
	public void setReceiver(long receiver) {
		this.receiver = receiver;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}

	public Timestamp getTime() {
		return time;
	}
	public void setTime(Timestamp time) {
		this.time = time;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public int getIsread() {
		return isread;
	}
	public void setIsread(int isread) {
		this.isread = isread;
	}
	
	
	public String prettyTime() {
		PrettyTime p = new PrettyTime(new Locale("zh"));
        return p.format(time);
	}
	
}

